Skip to content

Consistent with treating Ctor Call as Struct in liveness analysis #139782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2025

Conversation

xizheyin
Copy link
Contributor

@xizheyin xizheyin commented Apr 14, 2025

Fixes #139627

When ExprKind::Call is a Ctor, skips the checking of expr and only checks the arguments, thus being consistent with ExprKind::Struct.

r? compiler

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 14, 2025
@jieyouxu jieyouxu added L-unreachable_code Lint: unreachable_code A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Apr 14, 2025
@wesleywiser
Copy link
Member

Thanks @xizheyin!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 16, 2025

📌 Commit 8c8212e has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#138632 (Stabilize `cfg_boolean_literals`)
 - rust-lang#139416 (unstable book; document `macro_metavar_expr_concat`)
 - rust-lang#139782 (Consistent with treating Ctor Call as Struct in liveness analysis)
 - rust-lang#139885 (document RUSTC_BOOTSTRAP, RUSTC_OVERRIDE_VERSION_STRING, and -Z allow-features in the unstable book)
 - rust-lang#139904 (Explicitly annotate edition for `unpretty=expanded` and `unpretty=hir` tests)
 - rust-lang#139932 (transmutability: Refactor tests for simplicity)
 - rust-lang#139944 (Move eager translation to a method on Diag)
 - rust-lang#139948 (git: ignore `60600a6fa403216bfd66e04f948b1822f6450af7` for blame purposes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0757d24 into rust-lang:master Apr 17, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 17, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2025
Rollup merge of rust-lang#139782 - xizheyin:issue-139627, r=wesleywiser

Consistent with treating Ctor Call as Struct in liveness analysis

Fixes rust-lang#139627

When `ExprKind::Call` is a `Ctor`, skips the checking of `expr` and only checks the arguments, thus being consistent with `ExprKind::Struct`.

r? compiler
@xizheyin xizheyin deleted the issue-139627 branch April 22, 2025 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. L-unreachable_code Lint: unreachable_code S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhelpful unreachable_code warning on a tuple constructor with fields of uninhabited types
5 participants